package io.edap.protobuf.test;

import io.edap.protobuf.annotation.ProtoField;
import io.edap.protobuf.wire.Field.Type;
import java.io.Serializable;

/**
 * 登录请求
 */
public class LoginRequest implements Serializable {

    @ProtoField(tag = 1, type = Type.STRING)
    private String account;
    @ProtoField(tag = 2, type = Type.STRING)
    private String password;

    public LoginRequest() {
    }

    public LoginRequest(String account, String password) {
        this.account = account;
        this.password = password;
    }

    public String getAccount() {
        return account;
    }

    public LoginRequest setAccount(String account) {
        this.account = account;
        return this;
    }

    public String getPassword() {
        return password;
    }

    public LoginRequest setPassword(String password) {
        this.password = password;
        return this;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || this.getClass() != obj.getClass()) {
            return false;
        }
        LoginRequest that = (LoginRequest) obj;
        if (!java.util.Objects.equals(this.account, that.account)) {
            return false;
        }
        if (!java.util.Objects.equals(this.password, that.password)) {
            return false;
        }

        return true;
    }

}